#pragma once
#include <pqxx/pqxx>
#include <string>
#include <iostream>
#include <mupdf/pdf.h>
#include <vector>
class Toc{
    std::string title;
    std::string uri;
    int page;
    int level;
    int cid;
    int pcid;
    public:
    Toc(char* t,char * u,int page,int l):title(t),uri(u),page(page),level(l){
    }
    Toc(char* t,char * u,int page,int l,int c,int pc)
        :title(t),uri(u),page(page),level(l),cid(c),pcid(pc){
    }
    int get_cid(){
        return cid;
    }
    int get_pcid(){
        return pcid;
    }
    int get_level(){
        return level;
    }
    std::string& get_title(){
        return title;
    }
    std::string get_page(){
        return std::move(std::to_string(page));
    }
};

class PdfUtil{
   public:
   static  void testPdf();
   static  void testDraw();
   static  std::vector<Toc> getPdfToc(const char * filename);
   static int cid;
};
